/*
 * @Description:获取字典
 * @Version: 2.0
 * @Autor: kafei
 * @Date: 2021-12-01 11:17:15
 * @LastEditors: kafei
 * @LastEditTime: 2021-12-01 11:23:08
 */
const result = require('../utils/result')
const { getMapByTypeController } = require('../controller/mapController')
const getMapApi = (router) => {
  router.get('/getMapByType', async (ctx) => {
    const { type } = ctx.query
    if (!type) {
      return result('1', '请添加字典type参数!')
    }
    const resultData = await getMapByTypeController(type)
    ctx.body = resultData
  })
}
module.exports = getMapApi
